home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 4
/
Gold Medal Software - Volume 4 (Gold Medal) (1994).iso
/
os2
/
lbasic04.arj
/
BUTTONS.BAS
next >
Wrap
BASIC Source File
|
1993-12-29
|
1KB
|
81 lines
' This is a turtle graphics demo
size$ = "100"
size = val(size$)
color$ = "black"
button #1, Triangle, [triangle], LR, 140, 5
button #1, Square, [square], LR, 84, 5
button #1, Size, [size], LR, 44, 5
button #1, Quit, [quit], LR, 5, 5
button #1, Red, [colorRed], UL, 5, 5
button #1, Blue, [colorBlue], UL, 45, 5
button #1, Green, [colorGreen], UL, 85, 5
open "This is a turtle graphics window!" for graphics as #1
print"Press one of the buttons in the graphics window"
[loop]
input a$
goto [loop]
[triangle]
print #1, "color "; color$
print #1, "cls ; home ; down ; north"
for x = 1 to size
print #1, "turn 122 ; go "; str$(x*2)
next x
print #1, "flush"
goto [loop]
[square]
print #1, "color "; color$
print #1, "cls ; home ; down ; north"
for x = 1 to size
print #1, "turn 88 ; go "; str$(x*2)
next x
print #1, "flush"
goto [loop]
[colorRed]
color$ = "red"
goto [loop]
[colorBlue]
color$ = "blue"
goto [loop]
[colorGreen]
color$ = "green"
goto [loop]
[size]
prompt "What size figure?"; size$
size = val(size$)
if size < 1 then beep : goto [size]
goto [loop]
[quit]
confirm "Do you want to quit?"; quit$
if quit$ = "no" then [loop]
close #1
end